{% extends "basic.html" }
{% block content %}
		<div id='content'>
			<div id='welcome'>
				These are the twitter links from <a href='http://twitter.com/{{ username }}'>@{{ username }}</a>'s twitter feed.
			</div>
			<div id='search'>
				<form action="/" method="GET">
					<input type='hidden' name='user' value="{{ username }}"/>
					Search: &nbsp;<input type='text' value='{{ search }}' name='search' class='searchbox' title="Type some text and hit Enter, leave empty for all results">&nbsp; ⏎
				</form>
			</div>
			<div class="pagination">
			    <span class="step-links">
			        {% if has_previous  %}
			            <a class='pages' href="?user={{ username }}&page={{ previous_page }}"> ← </a>
			        {% endif %}

			        <span class="current">
			            Page {{ current_page }} of {{ total_pages }}.
			        </span>

			        {% if has_next %}
			            <a class='pages' href="?user={{ username }}&page={{ next_page }}"> → </a>
			        {% endif %}
			    </span>
			</div>
			<div id='links'>
			{% for status in stats_pages %}
				<div class='status'>
					<div class='originalText'>{{ status.originalText|urlize|twitterise }}</div>
					<div class='createdAt'>sent at: {{ status.createdAt }}</div>
					<div class='linksInStatus'>
						<ul>
						{% for url in status.urls %}
							{% if not url|isImageHosting %}
							<li>{{ url|urlizetrunc:"50" }}</li>
						    {% else %}
							<p> {{ url|image }}</p>
							{% endif %}
						{% endfor %} 
						</ul>
					</div>
				</div>
			{% endfor %}
			
			{% if not len_stats %}
			<p>No links yet? Don't be afraid &mdash; you'll have plenty of them soon. If you've just signed up, it may take a while to appear (usually less than 5 minutes, but you never know). While you're waiting &mdash; find some nice links and post to your Twitter so I'll have something to deal with!</p>
			{% endif %}
			</div>
		</div>
{% endblock %}